<script setup lang="ts">
import { ref } from 'vue'
import { useMemberStore } from '@/stores'
import { http } from '@/utils/http'

const data = ref()
const getData = async () => {
  const res = await http<number[]>({
    method: 'GET',
    url: '/home/banner',
    data: [],
  })
  data.value = res.result
  console.log('请求成功', res);



}
const memberStore = useMemberStore()
</script>

<template>
  <view class="my">
    <view>会员信息：{{ memberStore.profile }}</view>
    <button @tap="
      memberStore.setProfile({
        nickname: '黑马先锋',
      })
      " size="mini" plain type="primary">
      保存用户信息
    </button>
    <button @tap="memberStore.clearProfile()" size="mini" plain type="warn">清理用户信息</button>
    <button @tap="getData" size="mini" plain type="primary">222</button>
    {{ data }}11
  </view>
</template>

<style lang="scss">
//</style>
